/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * gui.java
 *
 * Created on 06.apr.2010, 14:42:38
 */

package towerdefencegame;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.border.LineBorder;

import tower.maintower;

/**
 *
 * @author Haaland
 */
@SuppressWarnings("serial")
public class oldGui extends javax.swing.JFrame {

    /** Creates new form gui */
    public oldGui() {
        try {
        UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        }  catch(Exception e) {};
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unused")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        mainPanel = new javax.swing.JPanel();
        tornPanel = new javax.swing.JPanel();
        toggleTower1 = new javax.swing.JToggleButton();
        toggleTower2 = new javax.swing.JToggleButton();
        toggleTower3 = new javax.swing.JToggleButton();
        toggleTower4 = new javax.swing.JToggleButton();
        toggleTower5 = new javax.swing.JToggleButton();
        toggleTower6 = new javax.swing.JToggleButton();
      
     
        rightInfoPanel = new javax.swing.JPanel();
        detailsLabel = new javax.swing.JLabel();
        inGameButtonPanel = new javax.swing.JPanel();
        buttonNextWave = new javax.swing.JButton();
        buttonMainMenu = new javax.swing.JButton();
        toggleButtonPause = new javax.swing.JToggleButton();
        bottomInfoPanel = new javax.swing.JPanel();
        infoNextWaveLabel = new javax.swing.JLabel();
        topInfoPanel = new javax.swing.JPanel();
        moneyLabel = new javax.swing.JLabel();
        healthLabel = new javax.swing.JLabel();
        scoreLabel = new javax.swing.JLabel();
        waveLabel = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        cells = new Cell[GRID_Y][GRID_X];
        loadGrid = new javax.swing.JMenuItem();
        

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SNUD TD");
        setBackground(mainPanel.getBackground());
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setMaximizedBounds(getMaximizedBounds());
        setMinimumSize(new java.awt.Dimension(800, 600));
        setName("SNUS TD"); // NOI18N
        
        mainPanel.setLayout(new java.awt.GridLayout(GRID_Y, GRID_X));
    	for(int y=0; y<GRID_Y; y++) {
        	for(int x=0; x<GRID_X; x++) {
        	mainPanel.add(cells[y][x] = new Cell(y,x)).setVisible(false);       	
        	}
        }
        mainPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "SNUS TD", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11))); // NOI18N
        mainPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        
       // Se side 552
        
      
         
        

   
        

        tornPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Towers", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11))); // NOI18N
        tornPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        tornPanel.setLayout(new java.awt.GridLayout(2,3));
        //tornPanel.setMaximumSize(new java.awt.Dimension(237, 180));
       // tornPanel.setMinimumSize(new java.awt.Dimension(237, 180));

      toggleTower1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleTower1ActionPerformed(evt);
            }
        });
//     	 toggleTower1.setIcon(new javax.swing.ImageIcon("resources/skruf.png")); // NOI18N
     	 toggleTower1.setIcon(new javax.swing.ImageIcon("resources/buttons/skruf_xstark.png"));
     	 toggleTower1.setSelectedIcon(new javax.swing.ImageIcon("resources/buttons/skruf_xstark_press.png"));

      
        toggleTower1.setMaximumSize(new java.awt.Dimension(52,33));
        tornPanel.add(toggleTower1);


        toggleTower2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleTower2ActionPerformed(evt);
            }
        });
    	 toggleTower2.setIcon(new javax.swing.ImageIcon("resources/buttons/skruf.png"));
     	 toggleTower2.setSelectedIcon(new javax.swing.ImageIcon("resources/buttons/skruf_press.png"));
   
        tornPanel.add(toggleTower2);

        	toggleTower3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleTower3ActionPerformed(evt);
            }
        });
          	 toggleTower3.setIcon(new javax.swing.ImageIcon("resources/buttons/mocca.png"));
         	 toggleTower3.setSelectedIcon(new javax.swing.ImageIcon("resources/buttons/mocca_press.png"));
     
        tornPanel.add(toggleTower3);

        	toggleTower4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleTower4ActionPerformed(evt);
            }
        });
        	 toggleTower4.setIcon(new javax.swing.ImageIcon("resources/buttons/MC.png"));
         	 toggleTower4.setSelectedIcon(new javax.swing.ImageIcon("resources/buttons/MC_press.png"));
  
        tornPanel.add(toggleTower4);

        	toggleTower5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleTower5ActionPerformed(evt);
            }
        });
         	 toggleTower5.setIcon(new javax.swing.ImageIcon("resources/buttons/gennis.png"));
         	 toggleTower5.setSelectedIcon(new javax.swing.ImageIcon("resources/buttons/gennis_press.png"));
  
        tornPanel.add(toggleTower5);

        	toggleTower6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleTower6ActionPerformed(evt);
            }
        });
        	 toggleTower6.setIcon(new javax.swing.ImageIcon("resources/buttons/gennis_xsterk.png"));
         	 toggleTower6.setSelectedIcon(new javax.swing.ImageIcon("resources/buttons/gennis_xsterk_press.png"));
  
        tornPanel.add(toggleTower6);

        rightInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Details", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11))); // NOI18N
        rightInfoPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightInfoPanel.setLayout(new java.awt.BorderLayout());

        detailsLabel.setText("INFO");
        detailsLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        rightInfoPanel.add(detailsLabel, java.awt.BorderLayout.CENTER);

        inGameButtonPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Menu", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11))); // NOI18N

        buttonNextWave.setText("Next wave");
        buttonNextWave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonNextWaveActionPerformed(evt);
            }
        });

        buttonMainMenu.setText("Main menu");
        buttonMainMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonMainMenuActionPerformed(evt);
            }
        });

        toggleButtonPause.setText("PAUSE");
        toggleButtonPause.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleButtonPauseActionPerformed(evt);
            }
        });
        
       // javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
       // mainPanel.setLayout(mainPanelLayout);
       // mainPanelLayout.setAutoCreateContainerGaps(true);
        
        javax.swing.GroupLayout inGameButtonPanelLayout = new javax.swing.GroupLayout(inGameButtonPanel);
        inGameButtonPanel.setLayout(inGameButtonPanelLayout);
        inGameButtonPanelLayout.setHorizontalGroup(
            inGameButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(inGameButtonPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(inGameButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(toggleButtonPause, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
                    .addComponent(buttonNextWave, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
                    .addComponent(buttonMainMenu, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)))
        );
        inGameButtonPanelLayout.setVerticalGroup(
            inGameButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(inGameButtonPanelLayout.createSequentialGroup()
                .addComponent(buttonNextWave, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toggleButtonPause, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonMainMenu))
        );

        bottomInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Next wave", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11))); // NOI18N
        bottomInfoPanel.setLayout(new java.awt.BorderLayout());

        infoNextWaveLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        infoNextWaveLabel.setText("Next wave will be: Catch");
        infoNextWaveLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        bottomInfoPanel.add(infoNextWaveLabel, java.awt.BorderLayout.CENTER);

        topInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Status", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11))); // NOI18N
        topInfoPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        topInfoPanel.setLayout(new java.awt.GridLayout(1, 4));

        moneyLabel.setBorder(javax.swing.BorderFactory.createTitledBorder("Money"));
        topInfoPanel.add(moneyLabel);

        healthLabel.setBorder(javax.swing.BorderFactory.createTitledBorder("Health"));
        topInfoPanel.add(healthLabel);

        scoreLabel.setBorder(javax.swing.BorderFactory.createTitledBorder("Score"));
        topInfoPanel.add(scoreLabel);

        waveLabel.setBorder(javax.swing.BorderFactory.createTitledBorder("Wave"));
        topInfoPanel.add(waveLabel);

        jMenu1.setText("File");
        loadGrid.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.ALT_MASK));
        loadGrid.setIcon(new javax.swing.ImageIcon(getClass().getResource("../icon.jpg"))); // NOI18N
        loadGrid.setText("Load ze grid");
        loadGrid.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	
                loadGridActionPerformed(evt);
            }
        });
        jMenu1.add(loadGrid);
        
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE)
                    .addComponent(topInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE)
                    .addComponent(bottomInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE))
               // .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(tornPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 237, 237)
                    .addComponent(rightInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(inGameButtonPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(topInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                      //  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 420, Short.MAX_VALUE)
                      //  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(bottomInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(tornPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                      //  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rightInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE)
                       // .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(inGameButtonPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))));
               // .addContainerGap())
        
        pack();
    }// </editor-fold>

    public void buttonNextWaveActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        setDetailsLabel("Next wave coming!");       
    }

    public void toggleButtonPauseActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        setDetailsLabel(((javax.swing.JToggleButton)inGameButtonPanel.getComponent(0)).isSelected() ?
                    "Game is paused!" :
                    ""
                );
        toggleTowerButtonPressed(-1);
    }

    private void toggleTower1ActionPerformed(java.awt.event.ActionEvent evt) {
        toggleTowerButtonPressed(1);
    }
    private void toggleTower2ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        toggleTowerButtonPressed(2);
    }

    private void toggleTower3ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        toggleTowerButtonPressed(3);
    }

    private void toggleTower4ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        toggleTowerButtonPressed(4);
    }

    private void toggleTower5ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        toggleTowerButtonPressed(5);
    }

    private void toggleTower6ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        toggleTowerButtonPressed(6);
    }


    public void buttonMainMenuActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        setDetailsLabel("Main menu");
    }
    
    private void loadGridActionPerformed(java.awt.event.ActionEvent evt) {
 
    	for(int y=0; y<mainPanel.getComponentCount(); y++) {
    		mainPanel.getComponent(y).setVisible(true);
        }

  
    	/*
        for(int y=0; y<GRID_Y; y++) {
        	for(int x=0; x<GRID_X; x++) {
            	cells[y][x].setBorder(new LineBorder(Color.DARK_GRAY, 1));
            	cells[y][x].setBackground(super.getBackground());
            	cells[y][x].repaint();
        	}
        }
        */
        loadGrid.setEnabled(false);
    }


    /**
    * @author Sindre Haaland
    * @param torn Number of the tower / toggle-button clicked
    */
    protected void toggleTowerButtonPressed(int torn) {
        for(int i=0; i<tornPanel.getComponentCount(); i++) {
            if(torn-1 != i)
            ((javax.swing.JToggleButton)tornPanel.getComponent(i)).setSelected(false);
            else 
                setDetailsLabel(((javax.swing.JToggleButton)tornPanel.getComponent(i)).isSelected() ?
                    "<HTML><B>Tower</B> #"+(i+1)+"'s information:<br><br>"+toggleTower1.getWidth()+ " "+toggleTower1.getHeight()+"</html>" :
                    ""
                );
        }
    }
    public int getSelectedTower() {
        for(int i=0; i<tornPanel.getComponentCount(); i++) {
            if(((javax.swing.JToggleButton)tornPanel.getComponent(i)).isSelected()) return (i+1);
            }
        return -1;
    }

    protected void setDetailsLabel(String tekst) {
        if(!((javax.swing.JToggleButton)inGameButtonPanel.getComponent(0)).isSelected() || tekst == "Game is paused!")
        detailsLabel.setText(tekst);
        else toggleTowerButtonPressed(-1);
    }
    /**
    * @param args the command line arguments
  
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
            new Gui().setVisible(true);
            }
        });
    }
    */
    
    
    // cl clicked, do stuff
    public void thisCellClicked(Cell cl, MouseEvent e) {
    	cl.setToken('X');
    	
    }
    public Cell[][] getGrid() {
    	return this.cells;
    }
    
    // Inner class for the Cells added
    public class Cell extends JPanel {
    	// Token for this Cell 
    	private char token = ' ';
    	private int y;
    	private int x;
    	private maintower torn;
    	
 
    	
    	public Cell(int y, int x) {
    		setBorder(new LineBorder(Color.black, 1)); // Setter rammen
    		addMouseListener(new MouseListener()); // Register listener
    		this.y = y;
    		this.x = x;
    		this.torn = null;

    		
    		// torn.fire(Creep);, torn.upgrade(int currentMoney) returns int money, torn.sell() - returns int money;
    		// torn.
    		// Creep: getX() getY()
    	
    	}
    	
    	//Pass through to this Gui method
	   	 public void cellClicked(MouseEvent e) {
	 	    thisCellClicked(this,e);
	 	 }
	   	 public void setTorn(maintower torn) {
	   		 this.torn = torn;
	   		 repaint();
	   	 }
	   	 public maintower getTorn() {
	   		 return this.torn;
	   	 }
	   	 public void setToken(char c) {
	   		 this.token = c;
	   		 repaint();
	   	 }
	   	 public char getToken() {
	   		 return this.token;
	   	 }
	   	 public int getY() {
	   		 return this.y;
	   	 }
	   	 public int getX() {
	   		 return this.x;
	   	 }
	   	 protected void paintComponent(Graphics g) {
	   		super.paintComponent(g); // <-- boken har den, men vet ikke hvorfor
	   		Image img;
	   		if(this.torn != null) {
	   		if(this.torn.getTowerType()==1) {
	   			img = (new ImageIcon("resources/towers/skruf_xstark.png").getImage());
	   				
	   		}
	   		else if(this.torn.getTowerType()==2) {
	   			 img = (new ImageIcon("resources/towers/skruf.png").getImage());
	   		}
	   		else if(this.torn.getTowerType()==3) {
	   			
	   			img = (new ImageIcon("resources/towers/mocca.png").getImage());
	   		}
	   		else {
	   			 img = (new ImageIcon("resources/gress.jpg").getImage());
	   		}
	   		
	   		g.drawImage(img,0,0,50,50,this);
	   		}
	   		else {
	   			
	   		 img = (new ImageIcon("resources/gress.jpg").getImage());
	   		
	   		
	   		g.drawImage(img,0,0,50,50,this);
	   		}
	   		 if(token == 'X') {
	   			 g.drawLine(10, 10, getWidth() - 10, getHeight()-10);
	   			 g.drawLine(getWidth() - 10, 10, 10, getHeight() - 10);
	   		 }
	   	 }
	    
	   	 
	   	 
	   	 // Se side 553
	   	 
    	private class MouseListener extends MouseAdapter {
    		public void mouseClicked(MouseEvent e) {
    			cellClicked(e);			
    		}
    	}
    }
    
    // Variables declaration - do not modify
    private javax.swing.JPanel bottomInfoPanel;
    private javax.swing.JButton buttonMainMenu;
    private javax.swing.JButton buttonNextWave;
    private javax.swing.JLabel detailsLabel;
    private javax.swing.JLabel healthLabel;
    private javax.swing.JPanel inGameButtonPanel;
    private javax.swing.JLabel infoNextWaveLabel;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuItem loadGrid;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private JPanel mainPanel;
    private javax.swing.JLabel moneyLabel;
    private javax.swing.JPanel rightInfoPanel;
    private javax.swing.JLabel scoreLabel;
    private javax.swing.JToggleButton toggleButtonPause;
    private javax.swing.JToggleButton toggleTower1;
    private javax.swing.JToggleButton toggleTower2;
    private javax.swing.JToggleButton toggleTower3;
    private javax.swing.JToggleButton toggleTower4;
    private javax.swing.JToggleButton toggleTower5;
    private javax.swing.JToggleButton toggleTower6;

    private javax.swing.JPanel topInfoPanel;
    protected javax.swing.JPanel tornPanel;
    private javax.swing.JLabel waveLabel;
    private Cell[][] cells;
    private int GRID_Y = 20;
    private int GRID_X = 20;
   
    // End of variables declaration
    
}
